x86/p2m: split write_p2m_entry() hook
authorJan Beulich <jbeulich@suse.com>
Wed, 18 Nov 2020 11:37:24 +0000 (12:37 +0100)
committerJan Beulich <jbeulich@suse.com>
Wed, 18 Nov 2020 11:37:24 +0000 (12:37 +0100)
commitdc5616e126714e7987cc1caf9bc7a95de0046ef7
tree9ab1bfa87e19f6be0c50b3af51fd4d7526b61995
parenta7ab52f9e87c5140b8f0c5444c79d061a6985a2b
x86/p2m: split write_p2m_entry() hook

Fair parts of the present handlers are identical; in fact
nestedp2m_write_p2m_entry() lacks a call to p2m_entry_modify(). Move
common parts right into write_p2m_entry(), splitting the hooks into a
"pre" one (needed just by shadow code) and a "post" one.

For the common parts moved I think that the p2m_flush_nestedp2m() is,
at least from an abstract perspective, also applicable in the shadow
case. Hence it doesn't get a 3rd hook put in place.

The initial comment that was in hap_write_p2m_entry() gets dropped: Its
placement was bogus, and looking back the the commit introducing it
(dd6de3ab9985 "Implement Nested-on-Nested") I can't see either what use
of a p2m it was meant to be associated with.

Signed-off-by: Jan Beulich <jbeulich@suse.com>
Acked-by: Tim Deegan <tim@xen.org>
Acked-by: Roger Pau Monné <roger.pau@citrix.com>
xen/arch/x86/mm/hap/hap.c
xen/arch/x86/mm/hap/nested_hap.c
xen/arch/x86/mm/p2m-pt.c
xen/arch/x86/mm/p2m.c
xen/arch/x86/mm/shadow/common.c
xen/include/asm-x86/p2m.h